//
//  ABNetworkUtil.h
//  Hive
//
//  Created by 惠俊贝 on 15/8/20.
//  Copyright (c) 2015年 ZM. All rights reserved.
//


#import <Foundation/Foundation.h>
#import "Soap.h"

typedef __block void(^ABNetworkSuccessBlock)(id response);
typedef __block void(^ABNetworkFailBlock)(NSError *error);


@class UserAccount;
@class AreaScope;
@interface ABNetworkUtil : NSObject

- (void)loginWithUserAccount:(UserAccount *)user
                     success:(ABNetworkSuccessBlock)success
                        fail:(ABNetworkFailBlock)fail;

- (void)getParentUserInfoWithToken:(NSString *)token
                           success:(ABNetworkSuccessBlock)success
                              fail:(ABNetworkFailBlock)fail;

- (void)getSelfUserEqpInfoWithToken:(NSString *)token
                            success:(ABNetworkSuccessBlock)success
                               fail:(ABNetworkFailBlock)fail;

//- (void)getSonUserEqpInfoWithSonUserId:(NSString *)sonUserId
//                             withToken:(NSString *)token
//                               success:(ABNetworkSuccessBlock)success
//                                  fail:(ABNetworkFailBlock)fail;

- (void)setPasswordWithOldPWD:(NSString *)oldPWD
                   withNewPWD:(NSString *)newPWD
                    withToken:(NSString *)token
                      success:(ABNetworkSuccessBlock)success
                         fail:(ABNetworkFailBlock)fail;

// GPS
- (void)getTrackInfoByIMEI:(NSString *)IMEI
                   success:(ABNetworkSuccessBlock)success
                      fail:(ABNetworkFailBlock)fail DEPRECATED_MSG_ATTRIBUTE("ByDeviceID now");

- (void)getTrackInfoByDeviceID:(NSString *)DeviceID
                   success:(ABNetworkSuccessBlock)success
                      fail:(ABNetworkFailBlock)fail;


- (void)getResponseGPSReplyWithDeviceID:(NSString *)deviceId
                          startTime:(NSString *)startTime
                            endTime:(NSString *)endTime
                            success:(ABNetworkSuccessBlock)success
                               fail:(ABNetworkFailBlock)fail;

// Alarm
- (void)addAreaScope:(AreaScope *)areaScope
                     success:(ABNetworkSuccessBlock)success
                        fail:(ABNetworkFailBlock)fail;

- (void)delAreaScope:(AreaScope *)areaScope
                     success:(ABNetworkSuccessBlock)success
                        fail:(ABNetworkFailBlock)fail;

- (void)modifyAreaScope:(AreaScope *)areaScope
                     success:(ABNetworkSuccessBlock)success
                        fail:(ABNetworkFailBlock)fail;

- (void)queryAreaScopeWithDeviceID:(NSString *)deviceId
                           success:(ABNetworkSuccessBlock)success
                              fail:(ABNetworkFailBlock)fail;

- (void)getAlarmsByUserID:(NSString *)userID
             andAlarmType:(NSString *)alarmType
                startTime:(NSString *)startTime
                  endTime:(NSString *)endTime
                  success:(ABNetworkSuccessBlock)success
                     fail:(ABNetworkFailBlock)fail;

- (void)getAlarmsByUserID:(NSString *)userID
                startTime:(NSString *)startTime
                  endTime:(NSString *)endTime
                  success:(ABNetworkSuccessBlock)success
                     fail:(ABNetworkFailBlock)fail;

- (void)getAlarmsByDeviceID:(NSString *)deviceID
               andAlarmType:(NSString *)alarmType
                  startTime:(NSString *)startTime
                    endTime:(NSString *)endTime
                    success:(ABNetworkSuccessBlock)success
                       fail:(ABNetworkFailBlock)fail;

- (void)getAlarmsByDeviceID:(NSString *)deviceID
                  startTime:(NSString *)startTime
                    endTime:(NSString *)endTime
                    success:(ABNetworkSuccessBlock)success
                       fail:(ABNetworkFailBlock)fail;

- (void)addAlarmsUserTel:(NSString *)deviceID
                 telList:(NSArray *)telList
                 success:(ABNetworkSuccessBlock)success
                    fail:(ABNetworkFailBlock)fail;


// DATALIB
- (void)queryDataLib:(NSString *)dataType
             success:(ABNetworkSuccessBlock)success
                fail:(ABNetworkFailBlock)fail;

// RiskService
- (void)getWeiZhangCitysuccess:(ABNetworkSuccessBlock)success
                          fail:(ABNetworkFailBlock)fail;

- (void)getHplzsuccess:(ABNetworkSuccessBlock)success
                  fail:(ABNetworkFailBlock)fail;

- (void)getWeizhangCity:(NSString *)city
                   hphm:(NSString *)hphm
                   hpzl:(NSString *)hpzl
               engineno:engineno
                classno:classno
               registno:registno
                success:(ABNetworkSuccessBlock)success
                   fail:(ABNetworkFailBlock)fail;
@end
